-- GENERATED SPELL FOR [Daggerspine Sorceress] --


function spell0_2596(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(421,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2596', 2000, 1)
end

function spell1_2596(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(20824,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2596', 3000, 1)
end

function spell2_2596(pUnit, Event) --@Lightning Shield,Self--
pUnit:FullCastSpellOnTarget(8134,pUnit)
pUnit:RegisterEvent('Sorts_2596', 612, 1)
end

function Sorts_2596(pUnit, Event)
local choix_sorts_2596 = math.random(0, 2)
if choix_sorts_2596 == 0 then
pUnit:RegisterEvent('spell0_2596', 1, 1)
end
if choix_sorts_2596 == 1 then
pUnit:RegisterEvent('spell1_2596', 1, 1)
end
if choix_sorts_2596 == 2 then
pUnit:RegisterEvent('spell2_2596', 1, 1)
end
end

function mob2596_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2596', math.random(1500, 3000), 1)
end

function mob2596_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2596_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2596_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2596, 1, 'mob2596_Action')
RegisterUnitEvent(2596, 2, 'mob2596_Leave')
RegisterUnitEvent(2596, 3, 'mob2596_Kill')
RegisterUnitEvent(2596, 4, 'mob2596_Die')
